// Copyright (c) 2011 The Kiwii Authors. All rights reserved.
// Use of this source code is governed by the New BSD License that can be
// found in the LICENSE file. See the AUTHORS file for names of contributors.

#ifndef KIWII_CLIENT_INTERNAL
#define KIWII_CLIENT_INTERNAL

#include "backend/KiwiiClient.hxx"
#include "backend/Db.hxx"
#include <string>

namespace kiwii {

  class KServer;

  struct KClientImpl : public KClient {
    KClientImpl(int connfd, net::EventLoopBase& el, KServer& server);

    void onRequest(comm::protocol::Request const&);

  private:
    std::string addr_;
    unsigned short port_;
    KServer& server_;

    DB* db_;
  };

}

#endif
